|
![](/i/fill.gif) |
Thorsten Froehlich wrote:
>
> In article <dsh2nt03gaj1u2o17rgsiblue403sip45i@4ax.com> , Peter Popov
> <pet### [at] vip bg> wrote:
>
> > c) boxes and spheres disappear when translated. Well, they might not
> > disappear, but they translate to the void (outside the field of view)
> > even with a small translation
>
> In
>
> CMatrix CMatrix::operator * (const CMatrix &M1) {
> unsigned char i, j, k;
> CMatrix Result = NullMatrix;
>
> for (i = 0 ; i < 4 ; i++)
> for (j = 0 ; j < 4 ; j++)
> for (k = 0 ; k < 4 ; k++)
> Result.Elements[i][j] += this->Elements[i][k] * M1.Elements[k][j];
>
> return Result;
> }
>
> you only return the result but should also copy it into the this-matrix.
Hmm, are you sure in it? Generally such expression
x=y*z;
should not modify y or z, but your proposal will change y. I guess that
you confuse operator * with operator *= in this case?
Post a reply to this message
|
![](/i/fill.gif) |